<?php

return array(
    'router' => array(
        'routes' => array(
            // The following is a route to simplify getting started creating
            // new controllers and actions without needing to create a new
            // module. Simply drop new controllers in, and you can access them
            // using the path /tennis-tournament/:controller/:action
            'home' => array(
                'type'    => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Index',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'default' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/[:controller][/:action]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                                '__NAMESPACE__' => 'TennisTournament\Controller',
                            ),
                        ),
                    ),
                ),
            ),
            'match' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/matches[/][:action]',
                    'constraints' => array(
                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*'
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Match',
                        'action'        => 'showAll'
                    ),
                ),
            ),
            'management' => array(
                'type'    => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/s1243Secure432Q_1',
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Management',
                        'action'        => 'management',
                    ),
                ),
            ),
            'group' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/groups[/][:action]',
                    'constraints' => array(
                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*'
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Group',
                        'action'        => 'showAll'
                    ),
                ),
            ),
            'authentication' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/authentication[/][:action]',
                    'constraints' => array(
                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*'
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Authentication',
                        'action'        => 'show'
                    ),
                ),
            ),
            'player' => array(
                'type'    => 'Segment',
                'options' => array(
                    'route'    => '/player[/][:action]',
                    'constraints' => array(
                        'action'     => '[a-zA-Z][a-zA-Z0-9_-]*'
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'TennisTournament\Controller',
                        'controller'    => 'Player',
                        'action'        => 'index'
                    ),
                ),
            ),
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map'             => include __DIR__  .'/../template_map.php',

        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    ),
    // Placeholder for console routes
    'console' => array(
        'router' => array(
            'routes' => array(
            ),
        ),
    ),
    // Object Relational Mapping with Doctrine 2
    'doctrine' => array(
        'driver' => array(
            'application_entities' => array(
                'class' =>'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => array(__DIR__ . '/../src/TennisTournament/Model')
            ),

            'orm_default' => array(
                'drivers' => array(
                    'TennisTournament\Model' => 'application_entities'
                )
            ),
            'cache' => array(
                'class' => 'Doctrine\Common\Cache\ApcCache'
            ),

            'configuration' => array(
                'orm_default' => array(
                    'metadata_cache' => 'apc',
                    'query_cache'    => 'apc',
                    'result_cache'   => 'apc'
                )
            ),
        )
    ),
);
